<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->

<!-- Head BEGIN -->
<head>
    <meta charset="utf-8">
    <title><?php echo $this->obj->getValidateMessage('pay-authorization'); ?></title>
    <?php echo $this->view->getPartial('layouts/_meta') ?>
</head>
<!-- Head END -->

<!-- Body BEGIN -->
<body class="corporate">

<?php echo $this->view->getPartial('layouts/_header') ?>

<div class="main">
    <div class="container">
        <ul class="breadcrumb">
            <li><a href="/"><?php echo $this->obj->getValidateMessage('shouye'); ?></a></li>
            <li><a href="/member"><?php echo $this->obj->getValidateMessage('member-center'); ?></a></li>
            <li class="active"><?php echo $this->obj->getValidateMessage('pay-authorization'); ?></li>
        </ul>
        <!-- BEGIN SIDEBAR & CONTENT -->
        <div class="row margin-bottom-40">

            <?php echo $this->view->getPartial('layouts/_member_sidebar') ?>

            <!-- BEGIN CONTENT -->
            <div class="col-md-9 col-sm-9">
                <h1 class="h1-title"><?php echo $h1; ?></h1>
                <p><?php echo $notice; ?></p>
                <div class="content-form-page">
                    <div class="row">
                        <div class="col-md-12">
                            <?php
                            if (isset($url)) {
                                echo $url['alipay_url'] . '　' . $url['wechat_url'];
                            } else {
                                // 否则，就是超级管理员
                                if (isset($page) && count($page->items) > 0) {
                                    ?>
                                    <table class="table table-hover table-responsive table-bordered">
                                        <tr>
                                            <th><?php echo $this->obj->getValidateMessage('company-name'); ?></th>
                                            <th><?php echo $this->obj->getValidateMessage('alipay-auth-status'); ?></th>
                                            <th><?php echo $this->obj->getValidateMessage('wechat-auth-status'); ?></th>
                                        </tr>
                                        <?php
                                        foreach ($page->items as $item) {
                                            ?>
                                            <tr>
                                                <td><?php echo $item['companyname']; ?></td>
                                                <td><?php echo $item['is_alipay_auth']; ?></td>
                                                <td><?php echo $item['is_wechat_auth']; ?></td>
                                            </tr>
                                            <?php
                                        }
                                        ?>
                                    </table>
                                    <?php
                                }
                            }
                            ?>
                        </div>
                    </div>
                </div>

                <!-- BEGIN PAGINATOR -->
                <?php if (isset($page) && $page->total_pages > 1) { ?>
                    <div class="page_margin pull-right">
                        <ul class="pagination ">
                            <li class="<?php echo $page->current <= 1 ? 'disabled' : ''; ?>"><a
                                        href="<?php echo $this->url->get('member/payauth', ['page' => $page->before]); ?>">&laquo;</a>
                            </li>
                            <?php for ($i = 1; $i <= $page->total_pages; $i++) { ?>
                                <li class="<?php echo $page->current == $i ? 'active' : ''; ?>"><a
                                            href="<?php echo $this->url->get('member/payauth', ['page' => $i]); ?>"><?php echo $i; ?></a>
                                </li>
                            <?php } ?>
                            <li class="<?php echo $page->current >= $page->total_pages ? 'disabled' : ''; ?>"><a
                                        href="<?php echo $this->url->get('member/payauth', ['page' => $page->next]); ?>">&raquo;</a>
                            </li>
                        </ul>
                    </div>
                <?php } ?>
                <!-- END PAGINATOR -->

            </div>
            <!-- END CONTENT -->
        </div>
        <!-- END SIDEBAR & CONTENT -->
    </div>
</div>

<?php echo $this->view->getPartial('layouts/_footer'); ?>

</body>
<!-- END BODY -->
</html>